package org.jash.mvp2206.video;

import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

import org.jash.mvp2206.R;

public class PlayerActivity extends AppCompatActivity {
    private String url;
    private VideoView video;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_player);
        url = getIntent().getStringExtra("url");
        video = findViewById(R.id.video);
        video.setVideoPath(url);
        video.start();
        video.setMediaController(new MediaController(this));
    }
}